Skip to content

[process-reboot-cause] Save boot_id and device fields for DPU reboot cause#405

Open
chartsai-nvidia wants to merge 2 commits into
sonic-net:masterfrom
chartsai-nvidia:chartsai/pmon-hld-update
Open

[process-reboot-cause] Save boot_id and device fields for DPU reboot cause#405
chartsai-nvidia wants to merge 2 commits into
sonic-net:masterfrom
chartsai-nvidia:chartsai/pmon-hld-update

Conversation

@chartsai-nvidia

@chartsai-nvidia chartsai-nvidia commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Why I did it

DPU reboot-cause entries written to CHASSIS_STATE_DB were missing the boot_id and
device fields, so consumers couldn't correlate a DPU reboot with its boot instance or
source device. NPU entries are unaffected.

Work item tracking
  • Microsoft ADO (number only): N/A

How I did it

  • Defined NPU_REBOOT_CAUSE_DB_FIELDS (cause, time, user, comment) and
    DPU_REBOOT_CAUSE_DB_FIELDS (adds boot_id, device) in process-reboot-cause.
  • Replaced the hardcoded per-field db.set calls with a loop over the field set
    selected by device type, so DPU rows now include boot_id and device.
  • Converted the showtech dump-path regex to a raw string to avoid invalid escape
    sequence warnings without changing its matching behavior.

How to verify it

  • Run the unit tests: tests/process-reboot-cause_test.py now asserts that a DPU
    reboot-cause file results in boot_id and device being written to
    CHASSIS_STATE_DB.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305
  • 202311
  • 202405
  • 202411

Description for the changelog

Save boot_id and device fields for DPU reboot-cause entries

@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown

Hi, there are workflow run(s) waiting for approval, you may be first-time contributor. I will notify maintainers to help approve once PR is approved. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

12 similar comments
@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown

This PR has backport request label(s) for branch(es): 202605, but is missing required test information. Please make sure you tick the tested branch(es) in the Tested branch section and provide test evidence (e.g., 202605: <test result>) in the Test result section as well in your PR description.

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

1 similar comment
@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown

Hi @sonic-net/sonic-host-services-maintainer, this approved PR has workflow run(s) waiting for approval. Please help review. Thanks!

---Powered by SONiC BuildBot

@vvolam vvolam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the cleanup — the loop-over-field-set refactor is clear and backward-compatible (NPU rows keep exactly cause/time/user/comment). One correctness gap inline regarding the device field, plus an optional nit below.

Nit (optional): to keep the two tuples from drifting, consider deriving one from the other:

NPU_REBOOT_CAUSE_DB_FIELDS = ("cause", "time", "user", "comment")
DPU_REBOOT_CAUSE_DB_FIELDS = NPU_REBOOT_CAUSE_DB_FIELDS + ("boot_id", "device")

Comment thread scripts/process-reboot-cause Outdated
Signed-off-by: Charles Tsai <chartsai@nvidia.com>
Signed-off-by: Charles Tsai <chartsai@nvidia.com>
@chartsai-nvidia
chartsai-nvidia force-pushed the chartsai/pmon-hld-update branch from 187331d to 160ba86 Compare July 24, 2026 18:28
@mssonicbld

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants